package com.second.app.designpattern.observer;

import java.util.List;

/**
 * @Author GYZ
 * @Date 2023/11/10
 * <pre>
 *  具体观察者（后几日比赛信息观察者）
 * </pre>
 */
public class FutureObserver implements Observer{


    private LolSubject lolSubject;

    public FutureObserver(LolSubject lolSubject){
        this.lolSubject =lolSubject;
    }
    @Override
    public void update() {
        List<String> msgList = lolSubject.getMsgList();
        System.out.println("比赛预告：");
        for (String s : msgList) {
            System.out.println(s);
        }
    }
}
